package com.example.demo.one2many;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = One2ManyQueueConfig.queueName)
public class Receiver2 {

    @RabbitHandler
    public void receive(String message) {
        System.out.println("Receiver2:" + message);
    }
}
